<template>
  <div>
    <van-field
      label="约谈目的"
      type="textarea"
      :autosize="autoSize"
      :value="form.PurposeInterview"
      readonly
    >
    </van-field>
    <van-field
      readonly
      label="被约谈单位"
      type="textarea"
      :autosize="autoSize"
      :value="form.Interviewee"
    >
    </van-field>
    <van-field
      label="约谈时间"
      :value="form.InterviewTime | formatDate"
      readonly
    >
    </van-field>
    <van-field
      label="约谈地点"
      type="textarea"
      :autosize="autoSize"
      :value="form.PlaceInterview"
      readonly
    >
    </van-field>
    <van-field
      label="约谈主要内容"
      type="textarea"
      :autosize="autoSize"
      :value="form.MainContentsInterview"
      readonly
    >
    </van-field>
    <van-field
      label="被约谈单位表态"
      type="textarea"
      :autosize="autoSize"
      :value="form.IntervieweePosition"
      readonly
    >
    </van-field>
    <file-format
      :attachs="form.Files"
      labelName="文件"
    > </file-format>
    <van-field
      class="input_text"
      label="被约谈人确认（签字）"
    >
      <template #input>
        <eagle-image-preview :images="form.ConfirmedSignature">
        </eagle-image-preview>
      </template>
    </van-field>
    <van-field
      class="input_text"
      label="约谈人（签字）"
    >
      <template #input>
        <eagle-image-preview :images="form.SignatureInterviewer"></eagle-image-preview>
      </template>
    </van-field>
    <van-field
      label="录入人"
      readonly
      :value="form.NoteTaker"
    > </van-field>
    <van-field
      label="录入时间"
      readonly
      :value="form.CreateDate"
    > </van-field>
  </div>
</template>

<script>
import FileFormat from "../../../components/Attach/FileFormat.vue";

export default {
  components: { FileFormat },
  data() {
    return {
      id: this.$route.query.id,
      autoSize: true,
      form: {},
    };
  },
  created() {
    this.getDetail();
  },
  methods: {
    getDetail() {
      var me = this;
      let params = { id: this.id };
      this.$axios
        .get(this.$constUrl.GX_InterviewRecord_GetDetail, { params: params })
        .then((res) => {
          me.form = res.data;
          me.form.TypeList =
            me.form.Type == null ? [] : me.form.Type.split(",");
        });
    },
  },
};
</script>
<style scoped="less">
.van-field__control {
  background: #fff;
}
</style>